import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: Login
  },
  {
    path: '/home',
    name: 'home',
    component:Home,
    children:[
      //基础信息
      {
        path:'/home/Personal Information',
        component:()=>('@/views/JCXX/SystemPage.vue')
      },
      {
        path:'/home/SystemPage',
        component:()=>('@/views/JCXX/Personal Information.vue')
      },
      //商品管理
      {
        path:'/home/ShopList',
        component:()=>('@/views/SPGL/ShopList.vue')
      },
      {
        path:'/home/AddShop',
        component:()=>('@/views/AddShop.vue')
      },
      {
        path:'/home/EditShop',
        component:()=>('@/views/SPGL/EditShop.vue')
      },
      //数据报表
      {
        path:'/home/Order Report',
        component:()=>('@/views/SJBB/Order Report.vue')
      },
      {
        path:'/home/ShopSale',
        component:()=>('@/views/SJBB/ShopSale.vue')
      },
      {
        path:'/home/Money',
        component:()=>('@/views/SJBB/Money.vue')
      },
      //采购管理
      {
        path:'/home/Supplier Management',
        component:()=>('@/views/CGGL/Supplier Management.vue')
      },
      {
        path:'/home/Purchase management',
        component:()=>('@/views/CGGL/Purchase management.vue')
      },
      {
        path:'/home/Requisition management',
        component:()=>('@/views/CGGL/Requisition management.vue')
      },
      {
        path:'/home/Return order management',
        component:()=>('@/views/CGGL/Return order management.vue')
      },
      //仓库管理
      {
        path:'/home/Warehouse management',
        component:()=>('@/views/CKGL/Warehouse management.vue')
      },
      {
        path:'/home/Pull Warehouse',
        component:()=>('@/views/CKGL/Pull Warehouse.vue')
      },
      {
        path:'/home/Warehousing',
        component:()=>('@/views/CKGL/Warehousing.vue')
      },
      //权限管理
      {
        path:'/home/Staff',
        component:()=>('@/views/Warehousing.vue')
      },
      {
        path:'/home/Company structure',
        component:()=>('@/views/Company structure.vue')
      },
      {
        path:'/home/To allocate',
        component:()=>('@/views/To allocate.vue')
      },
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
